*  FILE NAME: INPDRUG.PRG
*  BY: NURJADI PURNAMA
*  DATE: March 26, 1996
*  DESC:
*  CALLED BY:
*  DATA FILES:
SET PROC TO SOSPRO
SET PROC TO BOXPROC
DO START
set function 10 to space(5)
dr='n:'
f1='AEACORP'
set exclu off
USE &DR&F1
COUNT TO VCOUNTER
GO TOP
AEANAME = COMP_NAME
AEACOUN = COMP_COUN
AEAADDR = COMP_ADDR
AEACITY = COMP_CITY
set colo to bg+/b,w+/n
CLEAR
@ 7, 1 CLEA TO 23,78
IF VCOUNTER#0
   do addressa
ENDIF
SET COLO TO BG+/B,W+/N
@ 4,1 CLEAR TO 6,50
DO BOXT WITH 4,3,"UPDATE AEA CORPORATION",'BG+','GR',.F.,.T.
SET COLO TO BG+/B,W+/N
*set inte off
@ 10, 5 say 'COMPANY NAME  :'
@ 11, 5 say 'ADDRESS       :'
@ 12, 5 say 'C I T Y       :'
@ 13, 5 SAY 'COUNTRY       :'
@ 14, 5 SAY 'CURRENCY NAME :'
@ 15, 5 say 'CURRENCY      :'
@ 16, 5 SAY 'DECIMAL       :'
@ 17, 5 SAY 'AEA-TMS       :'
@ 18, 5 SAY 'DIAGNOSIS     :'
@ 19, 5 SAY 'PHONE NUMBER  :'
@ 20, 5 SAY 'FAX NUMBER    :'
@ 21, 5 say 'CHANGE CURRENCY  :'
@ 22, 5 say 'CASHIER PREPRINTED FORM :'
@ 22, 45 say 'V.A.T Rate : '

set color to w
del_rec = 'N'
option = 1
do while option <4
   SET COLO TO W/B,W+/N
   @ 0,0 CLEA TO 3,79
   @ 0,0 TO 24,80 DOUBLE
   set deli off
   AEANAME = COMP_NAME
   AEACOUN = COMP_COUN
   AEACUNM = COMP_CUNM
   AEAADDR = COMP_ADDR
   AEACITY = COMP_CITY
   AEACURR  = COMP_CURR
   AEADECI  = COMP_DECI
   AEAHEAL  = COMP_HEAL
   AEADIAG  = COMP_DIAG
   AEAPHON  = COMP_TELE
   AEAFAX   = COMP_FAX
   AEABCUR  = COMP_CHCR
   AEAPRIN  = COMP_PRIN
   vat      = comp_Vat
   DO ADDRESSA
   @ 10,21 say AEANAME
   @ 11,21 say AEAADDR
   @ 12,21 say AEACITY
   @ 13,21 SAY AEACOUN
   @ 14,21 SAY AEACUNM
   @ 15,21 say AEACURR
   @ 16,21 SAY AEADECI
   @ 17,21 SAY AEAHEAL
   @ 18,21 SAY AEADIAG

   @ 19,21 SAY AEAPHON
   @ 20,21 SAY AEAFAX
   @ 21,24 SAY AEABCUR
   @ 22,31 SAY AEAPRIN
   @ 22,58 say vat
   do mn_formc WITH OPTION
   do case
   case option = 1
      IF VCOUNTER = 1
         DO DISP_MSG WITH 'You can not add another AEA Corporation'
         LOOP
      ELSE
*         STORE ' ' TO vHLINE
*         DO get_optn with 'AEA-TMS (Y/N)','YN',vHLINE
*         IF vHLINE # 'Y'
*            AEAHEAL = 'NOT AEA-TMS'
*         ELSE
*            AEAHEAL = 'AEA-TMS'
*         ENDIF
         @ 10,21 GET AEANAME PICT '@!'
         @ 11,21 GET AEAADDR PICT '@!'
         @ 12,21 GET AEACITY PICT '@!'
         @ 13,21 GET AEACOUN PICT '@!'
         @ 14,21 GET AEACUNM PICT '@!'
         @ 15,21 GET AEACURR PICT '@!'
         @ 16,21 GET AEADECI PICT '@!'
         @ 17,21 GET AEAHEAL PICT '@!'
         @ 18,21 GET AEADIAG PICT '@!'
         @ 19,21 GET AEAPHON PICT '@!'
         @ 20,21 GET AEAFAX  PICT '@!'
         @ 21,24 GET AEABCUR PICT '@!'
         @ 22,31 GET AEAPRIN PICT '@!'
         @ 22,58 get vat     pict '99.99'
         READ
         STORE ' ' TO CORRECT
         IF AEADC='Y'
            AEADECI=.T.
         ELSE
            AEADECI=.F.
         ENDIF
         DO GET_OPTN WITH 'IS IT CORRECT (Y/N)','YN',CORRECT
         IF CORRECT#'Y'
            LOOP
         ELSE
            IF FIL_LOCK()
               APPE BLANK
               IF REC_LOCK()
                  REPL COMP_NAME WITH AEANAME,COMP_ADDR WITH AEAADDR
                  REPL COMP_CITY WITH AEACITY,COMP_CURR WITH AEACURR
                  REPL COMP_DECI WITH AEADECI,COMP_TELE WITH AEAPHON
                  REPL COMP_FAX WITH AEAFAX,COMP_COUN WITH AEACOUN,COMP_CUNM WITH AEACUNM
                  REPL COMP_CHCR WITH AEABCUR,COMP_DIAG WITH AEADIAG
                  REPL COMP_HEAL WITH AEAHEAL
                  REPL COMP_PRIN WITH AEAPRIN
                  repl comp_vat with vat
               ENDIF
               UNLOCK
            ENDIF
            LOOP
         ENDIF
      ENDIF
   case option = 2
      IF REC_LOCK()
         @ 10,21 GET COMP_NAME PICT '@!'
         @ 11,21 GET COMP_ADDR PICT '@!'
         @ 12,21 GET COMP_CITY PICT '@!'
         @ 13,21 GET COMP_COUN PICT '@!'
         @ 14,21 GET COMP_CUNM PICT '@!'
         @ 15,21 GET COMP_CURR PICT '@!'
*         @ 16,21 GET COMP_DECI PICT '@!'
         @ 16,21 GET COMP_DECI PICT "@!"
         @ 17,21 GET COMP_HEAL PICT '@!'
         @ 18,21 GET COMP_DIAG PICT '@!'
         @ 19,21 GET COMP_TELE PICT '@!'
         @ 20,21 GET COMP_FAX  PICT '@!'
         @ 21,24 GET COMP_CHCR PICT '@!'
         @ 22,31 GET COMP_PRIN PICT '@!'
         @ 22,58 get comp_vat  pict '99.99'
         READ
         LOOP
      ENDIF
   case option = 3
      EXIT
   endcase
enddo
close index
close data
set inte on
return
*Formatted by: Herman T Ver. 7.1  on March 26, 1996.
